<?php

namespace app\admin\model;

use app\admin\traits\ScopeUniacid;
use app\common\model\TimeModel;

class KnscyRedpackAgent extends TimeModel
{

    protected $name = "redpack_agent";

    protected $deleteTime = "delete_time";
    protected $globalScope = ['uniacid'];
    use ScopeUniacid;
    
    
    public function getRedpackTypeList()
    {
        return ['1'=>'优惠券','2'=>'线下凭证',];
    }

    public function getIsUsedList()
    {
        return ['0'=>'待用','1'=>'已用',];
    }

    public function getStatusList()
    {
        return ['0'=>'禁用','1'=>'启用',];
    }


    public function packInfo(){
        return $this->belongsTo(KnscyRedpack::class,'redpack_no','redpack_no');
    }

}